<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Player's Matches</title>
    </h:head>
    <h:body>
        <h:panelGrid columns="2" border="0">
            <f:view>
                <h:form>
                    <h:dataTable value="#{playerManagedBean.matches}" var="item" border="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row">
                        <f:facet name="header">
                            <h:outputText value="The matches you play"/>
                        </f:facet>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="- vs -"/>
                            </f:facet>
                            <h:outputText value="#{item.homeTeam} vs #{item.awayTeam}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Court"/>
                            </f:facet>
                            <h:outputText value="#{item.court}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Tournament"/>
                            </f:facet>
                            <h:outputText value="#{item.tournament.name}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Date"/>
                            </f:facet>
                            <h:outputText value="#{item.mDate}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Time"/>
                            </f:facet>
                            <h:outputText value="#{item.mTime}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Score"/>
                            </f:facet>
                            <h:outputText value="#{item.score}"/>
                        </h:column>
                        <h:column>
                            <h:commandLink value="Details" action="#{mainPageManagedBean.matchDetails(item)}"/>
                        </h:column>
                    </h:dataTable>
                </h:form>
            </f:view>
        </h:panelGrid>
    </h:body>
</html>

